package bean;

import java.util.Objects;

public class SC {
    private String sno;
    private String sname;
    private String cno;
    private String cname;
    private String grade;

    public SC() {
    }

    public SC(String sname, String cname, String grade) {
        this.sname = sname;
        this.cname = cname;
        this.grade = grade;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getSno() {

        return sno;
    }

    public void setSno(String sno) {
        this.sno = sno;
    }

    public String getCno() {
        return cno;
    }

    public void setCno(String cno) {
        this.cno = cno;
    }

    @Override
    public String toString() {
        return "SC{" +
                "sno='" + sno + '\'' +
                ", sname='" + sname + '\'' +
                ", cno='" + cno + '\'' +
                ", cname='" + cname + '\'' +
                ", grade='" + grade + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if ((!(o instanceof SC))) return false;
        SC sc = (SC) o;
        return Objects.equals(sno, sc.sno) && Objects.equals(cno, sc.cno);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sno, cno);
    }
}
